from PIL import Image
from PIL import ImageDraw, ImageFont

# 创建新图像
new_img = Image.new("RGB", (500, 500), "white")
draw = ImageDraw.Draw(new_img)

# 绘制矩形
draw.rectangle([(100, 100), (400, 400)], fill="blue", outline="red")

# 绘制线条
draw.line([(50, 50), (450, 450)], fill="green", width=5)

# 绘制圆形
draw.ellipse([(150, 150), (350, 350)], fill="yellow", outline="black")

new_img.save("drawings.jpg")